package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.UserHnaExt;
import com.sc.nft.mapper.UserHnaExtMapper;
import org.springframework.stereotype.Repository;

@Repository
public class UserHnaExtDao extends ServiceImpl<UserHnaExtMapper, UserHnaExt> {
  public UserHnaExt getByUserId(long userId) {
    LambdaQueryWrapper<UserHnaExt> query = new LambdaQueryWrapper<>();
    query.eq(UserHnaExt::getUserId, userId);
    return this.getOne(query);
  }
}
